package com.news.dao;

import java.util.List;

import org.hibernate.SessionFactory;

import com.news.entity.News;
import com.news.util.PageModel;

public interface NewsDao {

	public abstract void setSession(SessionFactory session);

	public abstract PageModel getPageModel(Integer currentPage, Integer rows);

	public abstract Long getAllCount();

	public abstract List<News> getAllNews(int currPage, int pageSize);

	public abstract PageModel getPageModelByPid(Integer currentPage,
			Integer rows, int pid);

	public abstract Long getAllCountByPid(int pid);

	public abstract List<News> getAllNewsByPid(int currPage, int pageSize,
			int pid);

	// addnews
	public abstract void addNews(News news);

	public abstract boolean delUser(int newsid);

	public abstract News getNews(int newsid);

	public abstract boolean updateNews(News news);

}